﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>Elemen DOM on-the-fly</title>
    <script src="script/jquery-1.3.2.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function SendComment() {
            jQuery(function($) {
                var comment = $("#txtComment").val();
                $("<tr><td>" + comment + "</td></tr>").appendTo("#TblComment");
                $("#txtComment").val("");
            });
        }
    </script>
    
    <style type="text/css">
        td
        {
        	border:dashed 1px Gray;
        }
    </style>
</head>
<body>
    <table id="TblComment" cellpadding="3">
        <tr>
            <td>
                Please put your comment here : <br />
                <input type="text" id="txtComment" />
                <input type="button" value="Send" onclick="SendComment()" />
            </td>
        </tr>
    </table>
</body>
</html>